package datatypes.film;

import java.util.ArrayList;
import java.util.List;

public class Films {
	List<Film> films;

	public Films() {
		this.films = new ArrayList<Film>();
	}

	public Films(Film film) {
		this.films = new ArrayList<Film>();
		this.films.add(film);
	}

	public Films(List<Film> films) {
		this.films = new ArrayList<Film>();
		this.films.addAll(films);
	}

	public void addFilm(Film film) {
		this.films.add(film);
	}

	public List<Film> getFilms() {
		return this.films;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		int filmIndex = 1;
		for (Film film : films) {
			sb.append("film <" + filmIndex++ + ">: \n");
			sb.append(film.toString() + "\n");
		}

		return sb.toString();
	}
}
